package com.jbm.onehome.iface;

import javax.persistence.*;
import com.jbm.core.iface.IAcross;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-04-26.
 */
@Entity
@Table(name = "mem_login_hsty", schema = "", catalog = "")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class MemLoginHstyEntity extends IAcross
{
	public MemLoginHstyEntity()
	{
		super();
	}

	public MemLoginHstyEntity(IAcross ia)
	{
		super(ia);
	}

    private int mlhstyId;
    private int memberId;
    private int loginId;
    private String type;
    private Timestamp startDate;
    private Timestamp endDate;
    private Timestamp lastUpdate;
    private Integer updateId;
    private String role;

    @Id
    @Column(name = "mlhsty_id")
    @GeneratedValue
    public int getMlhstyId() {
        return mlhstyId;
    }

    public void setMlhstyId(int mlhstyId) {
        this.mlhstyId = mlhstyId;
    }

    @Basic
    @Column(name = "member_id")
    public int getMemberId() {
        return memberId;
    }

    public void setMemberId(int memberId) {
        this.memberId = memberId;
    }

    @Basic
    @Column(name = "login_id")
    public int getLoginId() {
        return loginId;
    }

    public void setLoginId(int loginId) {
        this.loginId = loginId;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "start_date")
    public Timestamp getStartDate() {
        return startDate;
    }

    public void setStartDate(Timestamp startDate) {
        this.startDate = startDate;
    }

    @Basic
    @Column(name = "end_date")
    public Timestamp getEndDate() {
        return endDate;
    }

    public void setEndDate(Timestamp endDate) {
        this.endDate = endDate;
    }

    @Basic
    @Column(name = "last_update")
    public Timestamp getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Timestamp lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    @Basic
    @Column(name = "update_id")
    public Integer getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Integer updateId) {
        this.updateId = updateId;
    }

    @Basic
    @Column(name = "role")
    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MemLoginHstyEntity that = (MemLoginHstyEntity) o;

        if (loginId != that.loginId) return false;
        if (memberId != that.memberId) return false;
        if (mlhstyId != that.mlhstyId) return false;
        if (endDate != null ? !endDate.equals(that.endDate) : that.endDate != null) return false;
        if (lastUpdate != null ? !lastUpdate.equals(that.lastUpdate) : that.lastUpdate != null) return false;
        if (role != null ? !role.equals(that.role) : that.role != null) return false;
        if (startDate != null ? !startDate.equals(that.startDate) : that.startDate != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (updateId != null ? !updateId.equals(that.updateId) : that.updateId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = mlhstyId;
        result = 31 * result + memberId;
        result = 31 * result + loginId;
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (startDate != null ? startDate.hashCode() : 0);
        result = 31 * result + (endDate != null ? endDate.hashCode() : 0);
        result = 31 * result + (lastUpdate != null ? lastUpdate.hashCode() : 0);
        result = 31 * result + (updateId != null ? updateId.hashCode() : 0);
        result = 31 * result + (role != null ? role.hashCode() : 0);
        return result;
    }

    @Transient
    public boolean back;
    @Transient
    public String method;
    @Transient
    public String errorinfo;
    @Transient
    public int count;
    @Transient
    public int start=0;
    @Transient
    public int pagesize=0;
    @Transient
    public Integer tableid;
}
